package com.dfrz.factory;

import com.dfrz.entity.User;

/**
 * 静态工厂-静态方法
 * 用来创建对象
 */
public class StaticFactory {
    /**
     * 静态方法创建对象
     * @return
     */
    public static User createUser(){
        User user = new User();
        user.setId(100L);
        user.setUserName("张三");
        user.setPassword("123456");
        return user;
    }

}
